#ifndef W_IM_H
#define W_IM_H
/*
 *  cpu_gui/w_im_man.h
 *  
 *              CPU Monitor 
 *
 *    Spring Semester.  044800.    Technion.
 *   Copyright (C) 2006  Evgeny Shulman  and Elizabeth Shtrom 
 */

#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QFrame>
#include <QtGui/QGridLayout>
#include <QtGui/QHBoxLayout>
#include <QtGui/QLCDNumber>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QSpacerItem>
#include <QtGui/QTreeView>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
#include <QtGui/QGroupBox>
#include <QTimer>
#include <QTime>
#include <QWidget>

#include "w_pagew.h"

 class QAbstractItemModel;




 class ImWindow : public MonitorPageTab
 {
     Q_OBJECT

 public:
	ImWindow(int _nrCPUs, QWidget *parent =0 );
	ImWindow::~ImWindow();
  //   void setImTable(QAbstractItemModel *model);
  	QTreeView       *imView;
public slots:
	
	int _im_read(void);
	int  show_values( void) { return _im_read() ;}
private slots:
	int _im_start_stop  (void);
	int _im_restart(void);
	int _im_reset(void);

		int _im_start  (void);
	int _im_stop  (void);
	
 private:
 	
	void set_column_int(int column, int start, int counter,int *val) ;



	int nrCPUs;
	QGroupBox *imGroupBox;
		QLabel          *im_lbl;
		
		QAbstractItemModel *imList;
	QGroupBox *controlGroupBox;
//		QLCDNumber      *control_1_lcd;
//		QLabel          *control_2_lbl;
//		QLCDNumber      *control_2_lcd;
//		QLabel          *control_1_lbl;
		QLabel          *control_time_lbl;
		QLabel          *control_total_lbl;
		QLCDNumber      *control_time_lcd;
		QLCDNumber      *control_total_lcd;
		
		QPushButton     *read_btn;
		QPushButton     *reset_btn;
		QPushButton     *start_stop_btn;
	
	    QTimer *timer;
		QTime start_time;
 };
#endif

